﻿
using ProgressTracker.Domain;
using ProgressTracker.WebUI.Models.Shared;

namespace ProgressTracker.WebUI.Translation
{
    public interface ITaskModelMapper
    {
        TaskModel Create(TaskForDay task, Day day);
    }

    public class TaskModelMapper : ITaskModelMapper
    {
        //TODO: determine if day in signature is necessary (or if there's a way to work around it).
        public TaskModel Create(TaskForDay task, Day day)
        {
            return new TaskModel
            {
                Description = task.Description,
                Id = task.Id,
                IsComplete = task.IsComplete,
                Name = task.Name
            };
        }
    }
}